/*
 * Copyright (c) 2011-2023, ThinkWide (cnet2001@163.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.thinkwide.data.ormapping.db;

import javax.sql.DataSource;

/**
 * 数据库数据源信息类
 *
 * @author andyzhang
 * @since 2010-12-29
 */

public class MFConnectionInfo {
    private DataSource activeDataSource;
    private String name;
    private String dbVersion;
    private String driverClasses;
    private String adapterClasses;
    private String dbType;
    private String dbName;
    private String url;
    private String user;
    private String password;
    private String charset = "ISO";
    private Integer initialPoolSize = 8;
    private Integer maxPoolSize = 6000;
    private Integer minPoolSize = 50;
    private Integer maxIdleTime = 25000;
    private Integer acquireIncrement = 10;
    private Integer checkoutTimeout = 3600;
    private boolean autoCommitOnClose = true;
    private boolean testConnectionOnCheckin = false;
    private Integer IdleConnectionTestPeriod = 300;

    public void setActiveDataSource(DataSource activeDataSource) {
        this.activeDataSource = activeDataSource;
    }

    public DataSource getActiveDataSource() {
        return activeDataSource;
    }

    public void setDbVersion(String dbVersion) {
        this.dbVersion = dbVersion;
    }

    public String getDbVersion() {
        return dbVersion;
    }

    public void setDriverClasses(String driverClasses) {
        this.driverClasses = driverClasses;
    }

    public String getDriverClasses() {
        return driverClasses;
    }

    public void setAdapterClasses(String adapterClasses) {
        this.adapterClasses = adapterClasses;
    }

    public String getAdapterClasses() {
        return adapterClasses;
    }

    public void setDbType(String dbType) {
        this.dbType = dbType;
    }

    public String getDbType() {
        return dbType;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUrl() {
        return url;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getUser() {
        return user;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setCharset(String charset) {
        this.charset = charset;
    }

    public String getCharset() {
        return charset;
    }

    public void setInitialPoolSize(Integer initialPoolSize) {
        this.initialPoolSize = initialPoolSize;
    }

    public Integer getInitialPoolSize() {
        return initialPoolSize;
    }

    public void setMaxPoolSize(Integer maxPoolSize) {
        this.maxPoolSize = maxPoolSize;
    }

    public Integer getMaxPoolSize() {
        return maxPoolSize;
    }

    public void setMinPoolSize(Integer minPoolSize) {
        this.minPoolSize = minPoolSize;
    }

    public Integer getMinPoolSize() {
        return minPoolSize;
    }

    public void setMaxIdleTime(Integer maxIdleTime) {
        this.maxIdleTime = maxIdleTime;
    }

    public Integer getMaxIdleTime() {
        return maxIdleTime;
    }

    public void setAcquireIncrement(Integer acquireIncrement) {
        this.acquireIncrement = acquireIncrement;
    }

    public Integer getAcquireIncrement() {
        return acquireIncrement;
    }

    public void setCheckoutTimeout(Integer checkoutTimeout) {
        this.checkoutTimeout = checkoutTimeout;
    }

    public Integer getCheckoutTimeout() {
        return checkoutTimeout;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public String getDbName() {
        return dbName;
    }

    public void setAutoCommitOnClose(boolean autoCommitOnClose) {
        this.autoCommitOnClose = autoCommitOnClose;
    }

    public boolean isAutoCommitOnClose() {
        return autoCommitOnClose;
    }

    public void setTestConnectionOnCheckin(boolean testConnectionOnCheckin) {
        this.testConnectionOnCheckin = testConnectionOnCheckin;
    }

    public boolean isTestConnectionOnCheckin() {
        return testConnectionOnCheckin;
    }

    public void setIdleConnectionTestPeriod(Integer idleConnectionTestPeriod) {
        IdleConnectionTestPeriod = idleConnectionTestPeriod;
    }

    public Integer getIdleConnectionTestPeriod() {
        return IdleConnectionTestPeriod;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
}
